<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport"
          content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no"/>
    <title>已卖出的货品</title>
    <link rel="stylesheet" type="text/css" href="../../css/aui.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/common.css"/>
    <style>
        body {
            background: #f3f3f3;
            font-size: 16px;
        }

        .aui-icon-left {
            padding-left: 10px;
        }

        header {
            width: 100%;
            /*height: 45px;*/
            background: #fff;
            position: relative;
            z-index: 9;
        }

        .win_title {
            text-align: center;
            width: 100%;
            line-height: 45px;
            height: 45px;
        }

        .aui-iconfont {
            position: absolute;
        }

        .categoryList {
            display: -webkit-box;
            width: 100%;
            background: #fff;
        }

        .categoryList li {
            -webkit-box-flex: 1;
            font-size: 14px;
            text-align: center;

            height: 45px;
            line-height: 45px;
            color:#666;
        }

        .zf li.active:before {
            width: 70%;
            left: 15%;
        }
    </style>
</head>
<body>
<header class="">
    <div class="win_title aui-border-b">
        <div class="aui-pull-left aui-iconfont aui-icon-left icon-left-coler" tapmode onclick="closeWin()"></div>
        <div class="">
            已卖出的货品
        </div>
    </div>
    <ul class="categoryList zf myBorder">
        <li class="active" data-id="0" tapmode onclick="changeCheck(this)">全部</li>
        <li tapmode data-id="1" onclick="changeCheck(this)">待付款</li>
        <li tapmode data-id="2" onclick="changeCheck(this)">待发货</li>
        <li tapmode data-id="3" onclick="changeCheck(this)">待确认收货</li>
        <li tapmode data-id="4" onclick="changeCheck(this)">待评价</li>
    </ul>
</header>
</body>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../script/common.js"></script>
<script type="text/javascript" src="../../script/doT.min.js"></script>
<script type="text/javascript" src="../../script/jquery-1.11.3.js"></script>
<script type="text/javascript">
    apiready = function () {
        status=api.pageParam.status;
        if(status){
            $(".categoryList li").removeClass("active");
            $(".categoryList ").find("li").eq(status).addClass("active")
        }
        api.parseTapmode();
        var mobile = api.pageParam.mobile;
        var header = $api.dom('header');
        // var footer = $api.dom('footer');
        $api.fixIos7Bar(header);
        
        var header_h = $api.offset(header).h;
        // var footer_h = $api.offset(footer).h;
        var body_h = $api.offset($api.dom('body')).h - header_h;
        api.openFrame({
            name: 'sellerOrderList_frm',
            url: 'sellerOrderList_frm.html',
            rect: {
                x: 0,
                y: header_h,
                w: 'auto',
                h: body_h
            },
            pageParam:{
                status:status
            },
            bounces: false,
            vScrollBarEnabled: false,
            hScrollBarEnabled: false
        });
    }
    //为了在下面的热门类别可以通用，单独出来
    function changeCheck(obj) {
        $(obj).parent().find("li").removeClass("active");
        $(obj).addClass("active");
        var status = $(obj).attr('data-id');
        //发送监听
        api.sendEvent({
            name: 'orderStatus',
            extra: {
                status: status
            }
        });
    }
</script>
</html>
